﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace JXC.Core.Models
{
    /// <summary>
    /// 收款单
    /// </summary>
    public class Receipt
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid Id { get; set; }//单号
        public DateTime CollectionDays { get; set; }//收款日期
        public decimal Money { get; set; }//金额

        [ForeignKey("TheCustomerTableId")]
        public Guid Client { get; set; }//客户      目前没有客户表
        public string Currency { get; set; }//货币
        public Guid PersonHandlingATransaction { get; set; }//经手人   不会
        public string PaymentTerm { get; set; }//收款方式
        public string PaymentTo { get; set; }//收款去向
        [ForeignKey("UserInfosId")]
        public Guid Operator { get; set; }//操作员         有相应权限的员工     姑且默认为userInfos
        [ForeignKey("UserInfosId")]
        public Guid Auditor { get; set; }//审核人          有相应权限的员工
        public string Remark { get; set; }//备注
        public string AuditStatus { get; set; }//审核状态

        public TheCustomerTable TheCustomerTable { get; set; }
        public UserInfos UserInfos { get; set; }
    }
}
